% Naive implementation of computing triangle mesh surface area

function [ Area ] = triMeshArea( vertices, triangles )
nT = size(triangles, 1);
Area = 0;
% Sum up surfaces of all triangles (front side)
for tri = 1 : nT
    V = vertices( triangles(tri, :)', : );
    Area = Area + triArea(V);
end % for
end % function

% OTHER FUNCTIONS

function [Area] = triArea(V)
u = V(2, :) - V(1, :);
v = V(3, :) - V(1, :);
Area = norm(cross(u, v)) / 2;
end % for

